Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Summary

feat(schedule): add input form to schedule (#2405)
fix(serializer): condition check should check if any condition are met (#2410)

waleedlatif1 and others added 2 commits December 16, 2025 11:23
* feat(schedule): add input form to schedule

* change placeholder
#2410)

* fix(serializer): condition check should check if any condition are met

* remove comments

* remove more comments
@vercel
Copy link

vercel bot commented Dec 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Dec 16, 2025 10:39pm

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 16, 2025

Greptile Overview

Greptile Summary

This PR adds an input format feature to the Schedule trigger block and fixes a bug in the serializer's condition evaluation logic.

  • Schedule Input Format: Added inputFormat subblock to Schedule triggers, allowing users to define input parameters with default values for scheduled workflow executions. This aligns Schedule blocks with other trigger types (API, Start, Input triggers) that already support input format definitions.

  • Serializer Condition Fix: Changed from .find() to .filter() + .some() when checking subblock conditions. The previous logic only checked the first matching config with a given ID, which would fail when multiple configs share the same ID but have different conditions. The fix now correctly includes a field if ANY matching config satisfies its mode and condition constraints.

  • Minor cleanup: Removed unused config prop destructure from FieldFormat component and updated placeholder text from "Enter test value" to "Enter default value" to better reflect the purpose when used with scheduled executions.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it adds a straightforward feature and fixes a clear bug with a well-scoped solution.
  • The changes are well-contained: a new subblock added to schedule config, a clear bug fix in serializer condition evaluation (changing from find to filter+some), and minor UI cleanup. The logic change in the serializer is correct - when multiple configs share an ID, any one satisfying conditions should include the field. No breaking changes.
  • No files require special attention.

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx 5/5 Minor cleanup: removed unused config prop from destructure, changed default placeholder text from "Enter test value" to "Enter default value", removed unnecessary comment.
apps/sim/blocks/blocks/schedule.ts 5/5 Added new inputFormat subblock to Schedule trigger allowing users to define input parameters with default values for scheduled executions.
apps/sim/serializer/index.ts 5/5 Fixed condition evaluation to check if ANY matching config meets conditions (using .filter() + .some()) instead of only checking the first matching config (using .find()). This properly handles multiple subblock configs with the same ID.

Sequence Diagram

sequenceDiagram
    participant User
    participant ScheduleBlock
    participant Serializer
    participant InputFormat

    User->>ScheduleBlock: Configure schedule trigger
    ScheduleBlock->>InputFormat: Define input parameters with default values
    
    Note over Serializer: During serialization
    Serializer->>Serializer: extractParams(block)
    Serializer->>Serializer: Filter configs by ID (new: uses .filter())
    Serializer->>Serializer: Check if ANY config meets conditions (new: uses .some())
    Serializer->>Serializer: Include field if anyConditionMet
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit 837aabc into main Dec 16, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants